<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>
<div class=" yx-radius2" >
    <?php $form = ActiveForm::begin(['enableAjaxValidation' => true,'enableClientValidation' => false,'options'=>['class'=>'form-validate']]); ?>
    <table width="100%" class="table-form" >
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['name']; ?></th>
            <td><?= $form->field($model, 'name', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['position']; ?></th>
            <td style="display: inline-block;"><?= $form->field($model, 'position', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>[2=>'左侧'],'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['type_id']; ?></th>
            <td style="display: inline-block;"><?= $form->field($model, 'type_id', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>$typearr,'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['type']; ?></th>
            <td style="display: inline-block;"><?= $form->field($model, 'type', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>['news'=>'新闻','teacher'=>'老师','goods'=>'课程/商品'],'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['controllers']; ?></th>
            <td><?= $form->field($model, 'controllers', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['action']; ?></th>
            <td><?= $form->field($model, 'action', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['param']; ?></th>
            <td><?= $form->field($model, 'param', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text'])?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['sort_order']; ?></th>
            <td><?= $form->field($model, 'sort_order', ['template' => '{input}{hint}{error}'])->textInput(['class' => 'input-text'])->hint('数字越大越靠前')?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['status']; ?></th>
            <td><?= $form->field($model, 'status', ['template' => '{input}{hint}{error}'])->radioList(['1'=>'启用',2=>'禁用'],['prompt'=>'请选择状态','class' => 'input-dropdownlist']) ?></td>
        </tr>
    </table>
</div>
<div class="m_top_10" style="display: none">
    <?= \yii\helpers\Html::submitButton('提交', ['class' => "button", 'id' => 'dosubmit']) ?>
</div>
<?php \yii\widgets\ActiveForm::end(); ?>


<script>
</script>

